import React, { useState, useRef, useEffect } from 'react';
import { Button, Popover } from 'antd';
import { connect } from 'umi';
import TableDataBlock from '@/components/TableDataBlock';
import PopImgShow from '@/components/PopImgShow';
const Table = (props) => {
  const { list } = props;
  const getColumns = [
    {
      title: '商品名称',
      dataIndex: 'goodsName',
    },
    {
      title: '封面',
      dataIndex: 'cover',
      render: (val) => {
        return <PopImgShow width={40} url={val}></PopImgShow>;
      },
    },
  ];
  return (
    <>
      <TableDataBlock
        columns={getColumns}
        rowKey={(record) => `${record.goodsId}`}
        list={list}
      ></TableDataBlock>
    </>
  );
};

export default Table;
